<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>一列布局</title>
</head>
<style>
    *{
        margin: 0;
        height:0;
    }
    .top{
        height: 100px;
        background: blue;
    }
    .main{
        margin: 0 auto;
        width: 800px;
        height: 300px;
        background: #ccc;
    }
    .foot{
        margin: 0 auto;
        width: 800px;
        height: 300px;
        background: #900
    }
</style>
<body>
    <div class="top"></div>
    <div class="main"></div>
    <div class="foot"></div>
</body>
</html>